package patrol.mobile.com.mobilepatrol.activity;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import butterknife.BindView;
import butterknife.ButterKnife;
import patrol.mobile.com.mobilepatrol.R;
import patrol.mobile.com.mobilepatrol.utils.CommonUtil;
import patrol.mobile.com.mobilepatrol.widget.AlwaysMarqueeTextView;

/**
 * Created by z on 2018/9/3.
 * Des:
 */

//测试数据  20180907 测试代码张志敏
public class TextActivtyByZzm02 extends AppCompatActivity {
    @BindView(R.id.iv_back)
    ImageView ivBack;
    @BindView(R.id.iv_back2)
    ImageView ivBack2;
    @BindView(R.id.tv_left_title)
    TextView tvLeftTitle;
    @BindView(R.id.tv_center_title)
    AlwaysMarqueeTextView tvCenterTitle;
    @BindView(R.id.iv_center_title)
    ImageView ivCenterTitle;
    @BindView(R.id.iv_end_title)
    ImageView ivEndTitle;
    @BindView(R.id.tv_end_title)
    TextView tvEndTitle;
    @BindView(R.id.iv_right_title)
    ImageView ivRightTitle;
    @BindView(R.id.tv_right_title)
    TextView tvRightTitle;
    @BindView(R.id.app_title_rela)
    RelativeLayout appTitleRela;
    @BindView(R.id.mBack)
    TextView mBack;

    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_zzm02);
        ButterKnife.bind(this);
        initTitle();
        initView();
    }

    public void initTitle() {
        ivBack.setVisibility(View.VISIBLE);
        ivBack.setImageResource(R.mipmap.up_white);
        ivBack.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                CommonUtil.exitActivityAndBackAnim(TextActivtyByZzm02.this, true);
            }
        });
        tvCenterTitle.setVisibility(View.VISIBLE);
        tvCenterTitle.setText(getResources().getString(R.string.title_koufenmingxi));
    }

    public void initView() {
        mBack.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                CommonUtil.exitActivityAndBackAnim(TextActivtyByZzm02.this, true);
            }
        });
    }
}
